package lib.messaging;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.UnknownHostException;
import java.util.List;

/**
 * Interface for sending packets
 * @author abhip
 *
 */
public interface ISender
{
    /**
     * Sends data given addresses
     * @param addresses
     * @param data Data to be sent
     * @throws UnsupportedEncodingException
     * @throws IOException
     * @throws UnknownHostException
     */
    void SendBytes(List<NetworkAddress> addresses, byte[] data)
            throws UnsupportedEncodingException, UnknownHostException, IOException;

    /**
     * Sends data
     * @param address
     * @param data Data to be sent
     * @throws UnsupportedEncodingException
     * @throws IOException
     * @throws UnknownHostException
     */
    void SendBytes(NetworkAddress address, byte[] data)
            throws UnsupportedEncodingException, UnknownHostException, IOException;
}
